<!--异常放行-->
<template>
  <div class="common-body-wrapper">
    <search-header
      single-width="130"
      :searchList="searchList"
      @changeHeight="toRetTable"
      @confirmSearch="toSearch"
      :isCheckbox="true"
      :isNeedTree="true"
      :paramName="paramName"
      @setSelectedNode="setSelectedNode"
    ></search-header>
    <div class="common-table-tree-wrapper">
      <!-- <table-tree :isCheckbox="true" :isNeedTree="isNeedTree" :paramName="paramName" @toggleTreeBox="toggleTreeBox" @setSelectedNode="setSelectedNode" @searchFn="getList">
      </table-tree>-->

      <div class="common-table-wrapper">
        <multi-fun-table
          :sortColumn="notFormatColumn"
          :orderType="sortType"
          :fixed-cols="fixedCols"
          :is-reset-table="isResetTable"
          :theads-info="theadsInfo"
          :tbodys-info="tbodysInfo"
          @handleMultiCheck="handleMultiCheck"
          @handleSortColumn="handleSortColumn"
          @searchFn="getList"
          @getNextPage="getNextPage"
        >
          <div class="operate-btn-group" slot="operateBtnGroup">
            <a
              class="ake_btn ake_btn_text"
              v-if="isPermmited('PARKING_OPERATION:ABNORMAL_OUT_CAR:EXPORT')"
              @click.prevent="exportData()"
            >导出</a>
          </div>
          <template slot="tdCell" slot-scope="props">
            <el-table-column
              :fixed="props.fixed"
              :label="props.label"
              :min-width="props.minWidth"
              :width="props.width"
              :prop="props.prop"
              :sortable="props.sortable"
            >
              <template slot-scope="scope">
                <span v-if="'reno' == props.prop">{{scope.$index+1}}</span>
                <span v-else-if="'carNoImageUrl' == props.prop">
                  <a
                    class="imgLink"
                    @click="showBigImgModal('bigPicModal', scope.row['carImageUrl'])"
                  >
                    <img
                      class="carNoImage"
                      style="width: 60px;height:30px;"
                      alt="暂无"
                      :src="scope.row.carNoImageUrl"
                    />
                  </a>
                </span>
                <span v-else>{{ scope.row[props.prop] }}</span>
              </template>
            </el-table-column>
          </template>
        </multi-fun-table>

        <table-pagination :size="total" :cur-page="pageNumber" @backData="getPagination"></table-pagination>
      </div>
    </div>

    <big-pic-modal ref="bigPicModal">
      <img
        slot="bigImgSlot"
        :src="bigImgPath | setImgPath"
        alt
        @error="imgError('../../', 'car', $event)"
      />
    </big-pic-modal>
  </div>
</template>

<script>
import common from "@mixins/common.js";
import stardardList from "@mixins/tables/stardardList.js";

//modal
import invokeModal from "@mixins/modal/invokeModal.js";
import BigPicModal from "@components/widgets/BigPicModal.vue";

// image
import images from "@mixins/image.js";

// 引进vue的js
import abnormal_out_car from "./js/abnormal_out_car.js";
export default {
  mixins: [common, stardardList, invokeModal, images, abnormal_out_car],
  components: {
    BigPicModal
  },
  data() {
    const today = [
      new Date(moment().format("YYYY-MM-DD 00:00:00")),
      new Date(moment().format("YYYY-MM-DD 23:59:59"))
    ];

    return {
      fixedCols: 3,
      total: 0,
      paramName: "parkIds",
      //prop-返回数据的字段名称   proisNotInter:true,pNameisNotInter:true,，name-查询字段传参名称    text-显示名称  //initHidden  初始化不显示
      searchList: [
        {
          type: "datePicker",
          isShow: false,
          name: "query_time1",
          text: "出场时间",
          propName: "leaveTimeFrom,leaveTimeTo",
          value: today,
          style: { width: "360px" }
        },
        {
          type: "text",
          isShow: false,
          name: "carCode",
          text: "车牌号码",
          value: ""
        },
        {
          type: "text",
          isShow: false,
          name: "enterCardCode",
          text: "卡号",
          value: ""
        },
        {
          type: "select",
          isShow: false,
          name: "manualMatch",
          text: "匹配状态",
          value: "",
          options: [
            { name: "全部", value: "" },
            { name: "匹配", value: "1" },
            { name: "未匹配", value: "0" }
          ]
        },
        {
          type: "select",
          isShow: false,
          name: "isCorrect",
          text: "是否人工干预",
          value: "",
          options: [
            { name: "全部", value: "" },
            { name: "是", value: "1" },
            { name: "否", value: "0" }
          ]
        },
        {
          type: "text",
          isShow: false,
          name: "leaveChannelName",
          text: "离场通道",
          value: ""
        },
        {
          type: "select",
          isShow: false,
          name: "vipType",
          text: "离场VIP",
          value: "",
          options: []
        },

        {
          type: "datePicker",
          isShow: false,
          name: "query_time2",
          text: "放行时间",
          propName: "outOperatorTimeFrom,outOperatorTimeTo",
          value: "",
          style: { width: "360px" }
        },
        {
          type: "text",
          isShow: false,
          name: "outOperatorName",
          text: "放行操作员",
          value: ""
        }
      ],
      theadsInfo: [
        { index: 0, isShow: false, prop: "reno", text: "序号", width: 64 },
        {
          index: 1,
          isShow: false,
          prop: "carNoImageUrl",
          text: "车牌图片",
          sortable: true,
          minWidth: 150
        },
        {
          index: 2,
          isShow: false,
          prop: "carCode",
          text: "车牌号",
          sortable: true,
          minWidth: 200
        },
        {
          index: 3,
          isShow: false,
          prop: "enterCardCode",
          text: "卡号",
          sortable: true,
          minWidth: 120
        },
        {
          index: 4,
          isShow: false,
          prop: "parkName",
          text: "停车场",
          sortable: true,
          minWidth: 180
        },
        {
          index: 5,
          isShow: false,
          prop: "enterTime",
          text: "进场时间",
          sortable: true,
          minWidth: 180
        },
        {
          index: 6,
          isShow: false,
          prop: "enterChannelName",
          text: "进场通道",
          sortable: true,
          minWidth: 150
        },
        {
          index: 7,
          isShow: false,
          prop: "enterCarCode",
          text: "进场车牌号",
          sortable: true,
          minWidth: 180
        },
        {
          index: 8,
          isShow: false,
          prop: "leaveTime",
          text: "出场时间",
          sortable: true,
          minWidth: 180
        },
        {
          index: 9,
          isShow: false,
          prop: "leaveChannelName",
          text: "出场通道",
          sortable: true,
          minWidth: 150
        },
        {
          index: 10,
          isShow: false,
          prop: "vipType",
          text: "VIP类型",
          sortable: true,
          minWidth: 120
        },
        {
          index: 11,
          isShow: false,
          prop: "shouldValue",
          text: "应收款",
          sortable: true,
          minWidth: 120
        },
        {
          index: 12,
          isShow: false,
          prop: "reliefValue",
          text: "优惠金额",
          sortable: true,
          minWidth: 120
        },
        {
          index: 13,
          isShow: false,
          prop: "realValue",
          text: "实收款",
          sortable: true,
          minWidth: 120
        },
        {
          index: 14,
          isShow: false,
          prop: "scoreReliefValue",
          text: "车场积分",
          sortable: true,
          minWidth: 120
        },
        {
          index: 15,
          isShow: false,
          prop: "outOperatorName",
          text: "放行操作员",
          sortable: true,
          minWidth: 150
        },
        {
          index: 16,
          isShow: false,
          prop: "outOperatorTime",
          text: "放行时间",
          sortable: true,
          minWidth: 180
        },
        {
          index: 17,
          isShow: false,
          prop: "abnormalOutReason",
          text: "异常放行原因",
          sortable: true,
          minWidth: 180
        },
        {
          index: 18,
          isShow: false,
          prop: "manualMatchStr",
          text: "匹配状态",
          sortable: true,
          minWidth: 160
        },
        {
          index: 19,
          isShow: false,
          prop: "isCorrectStr",
          text: "是否人工干预",
          sortable: true,
          minWidth: 160
        }
      ],
      tbodysInfo: []
    };
  },
  methods: {}
};
</script>

<style lang="less" scoped>
</style>